<template>
  <!-- 我的简历页面 -->
  <div class="note">
      <el-button type="primary" class="perfect_btn" @click="perfect">完善我的简历</el-button>

      <el-table class="notesForm" :data="UserResumeList.slice((currentPage-1)*pageSize,currentPage*pageSize)" height="560" border>
        <el-table-column
          prop="startParty"
          label="开始年份">
        </el-table-column>
        <el-table-column
          prop="endParty"
          label="结束年份">
        </el-table-column>
        <el-table-column
          prop="address"
          label="地址">
        </el-table-column>
        <el-table-column
          prop="schoolName"
          label="学校名称">
        </el-table-column>
          <el-table-column
          prop="stage"
          label="阶段">
        </el-table-column>
         <el-table-column
          prop="certifier"
          label="证明人">
        </el-table-column>
      </el-table>
      <notesadd @Notestion="Notestion" v-show="shownotes" ref="notesopen"></notesadd>
  </div>

</template>

<script>
import notesadd from "./notesAdd.vue"
export default {
  components:{
    notesadd
  },
  data(){
    return {
      notesForm:{
        stage: "",//阶段
        startParty: "",//开始年份
        endParty: "",//结束年份
        schoolName: "",//学校名称
        certifier: "",//证明人
        address: "",//地址
      },
      shownotes:false,//是否打开弹框
      UserResumeList:[],
      total:0,
      currentPage: 1,
      pageSize: 6,
    }
    
  },
  mounted(){
    this.Notestion()
    // console.log("执行mounted里面的东西")
  },
  methods:{
    Notestion(){//获取简历列表
      // console.log("调用了")
      this.axios({
        headers:{'Authentication':localStorage.getItem('token')},
        method:"post",
        // url:"api/resume/getUserResumeList",
        url:"/resume/getUserResumeList",
      }).then(res=>{
        // console.log(res)
        if(res.data.code != 20001){
          return this.$message.error(res.data.msg)
        }
        else{
          this.UserResumeList = res.data.data
        }
      })
    },
    perfect(){
      this.shownotes = true
      this.$nextTick(() => {
        this.$refs.notesopen.init()
      })
    },
    handleCurrentChange(val){//点击获取页码
      this.currentPage = val
    },
    handleSizeChange(val) {
      this.pageSize = val
      this.currentPage = 1
    },

  }
}
</script>

<style lang="scss">
.note{
  // margin-top: 3vh;
  .perfect_btn{
    margin-bottom: 3vh;
  }
}
.note .cell{
  text-align: center;
}

</style>